#include "xing9.h"
#include <cstdio>
#include "base/utils.h"

XING9_CEXT::XING9_CEXT():
    _wx(WUXING::WX__), _wxxqf1(-1), _wxxqf2(-1), _clr("")
{

}

XING9_CEXT::XING9_CEXT(int wx, const char * clr)
    :_wx(wx), _wxxqf1(-1), _wxxqf2(-1), _clr(clr)
{

}

WUXING::WX5 XING9_CEXT::wx5() const
{
    return _wx;
}

void XING9_CEXT::gyu(WUXING::WX5 wx)
{
    _wxxqf2 = wx - wx5();
}

void XING9_CEXT::wyu(WUXING::WX5 wx)
{
    _wxxqf1 = wx - wx5();
}

WUXING::WXXQF XING9_CEXT::wxxqfg() const
{
    return _wxxqf2;
}

WUXING::WXXQF XING9_CEXT::wxxqfw() const
{
    return _wxxqf1;
}

const char *XING9_CEXT::clr() const
{
    return _clr;
}

template<> const QM::XING9 QM::XING9::_default =
    { QM::X____, " ", WUXING::WX__, " "};
template<> const QM::XING9 QM::XING9::_objs[9] =
{
    {QM::PPENG, "蓬", WUXING::SHUI, "白",},
    {QM::RENNN, "任", WUXING::TUUU, "白",},
    {QM::CHONG, "冲", WUXING::MUUU, "碧",},
    {QM::FUUUU, "辅", WUXING::MUUU, "绿",},
    {QM::YYING, "英", WUXING::HUOO, "紫",},
    {QM::RUIII, "芮", WUXING::TUUU, "黑",},
    {QM::ZHUUU, "柱", WUXING::JINN, "赤",},
    {QM::XINNN, "心", WUXING::JINN, "白",},
    {QM::QINNN, "禽", WUXING::TUUU, "黄",},
};

template<> const XK::XING9 XK::XING9::_default =
    { -1, " ", -1, " "};
template<> const XK::XING9 XK::XING9::_objs[9] =
{
    {0, "贪狼", WUXING::SHUI, "白",},
    {1, "左辅", WUXING::TUUU, "白",},
    {2, "禄存", WUXING::MUUU, "碧",},
    {3, "文曲", WUXING::MUUU, "绿",},
    {4, "右弼", WUXING::HUOO, "紫",},
    {5, "巨门", WUXING::TUUU, "黑",},
    {6, "破军", WUXING::JINN, "赤",},
    {7, "武曲", WUXING::JINN, "白",},
    {8, "廉贞", WUXING::TUUU, "黄",},
};

template<> const BD::XING9 BD::XING9::_default =
    { -1, " ", -1, " "};
template<> const BD::XING9 BD::XING9::_objs[9] =
{
    {0, "天枢", WUXING::SHUI, "白",},
    {1, "招摇", WUXING::TUUU, "白",},
    {2, "天机", WUXING::MUUU, "碧",},
    {3, "天权", WUXING::MUUU, "绿",},
    {4, "梗河", WUXING::HUOO, "紫",},
    {5, "天璇", WUXING::TUUU, "黑",},
    {6, "摇光", WUXING::JINN, "赤",},
    {7, "开阳", WUXING::JINN, "白",},
    {8, "玉衡", WUXING::TUUU, "黄",},
};
